<?php
	require_once 'dbhelper.php';
	$regdata = $_POST["regdata"];
	//echo $regdata;
	$user = json_decode($regdata,true);
	
	$helper = new DBHelper();
	$conn = $helper->getConn("root", "root", "r1home");
	if(!$conn)
	{
		echo "暂时不能连接到服务器，请稍后重试";
		return;
	}
	else 
	{
		$helper->registerUser($user["sid"], $user["pwd"], $user["name"], NULL, $user["sex"]);
	}
	
?>